//
//  DefaultNotificationCenter.h
//  MyFunctionDemo
//
//  Created by Ting Han on 2017/9/2.
//  Copyright © 2017年 Ting Han. All rights reserved.
//

#import <UIKit/UIKit.h>
@class DefaultNotificationCenter;

@protocol DefaultNotificationCenterDelegate <NSObject>

@required

//当收到通知的回调
- (void)defaultNotificationCenter:(DefaultNotificationCenter *)notification name:(NSString *)name object:(id)object;


@end

@interface DefaultNotificationCenter : NSObject


@property (nonatomic,weak) id<DefaultNotificationCenterDelegate>delegate;

+ (void)postEventToNotificationName:(NSString *)name object:(id)object;

- (void)addNotificationName:(NSString *)name;

- (void)deleteNotificationName:(NSString *)name;

- (NSArray <NSString *> *)notificationNames;

- (void)removeAllNotifications;

+ (instancetype)defaultNotificationCenterWithDelegate:(id<DefaultNotificationCenterDelegate>)delegate addNotificationNames:(void(^)(NSMutableArray <NSString *> *names))addNotificationNamesBlock;


@end
